﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ITAP.ShprossesBuilder.Modelling.Components.Actions;

namespace ITAP.ShprossesBuilder.Editor
{
    public enum AlignRelative
    {
        ToModelSize, 
        ToInnerModelSize, 
        ToModelCellSize, 
        ToBounds
    }

    public partial class AlignComponentsRelativeToModelForm : Form
    {
        private ComponentAlign align;

        public ComponentAlign Align
        {
            get { return align; }
        }
        private AlignRelative alignRelative;

        public AlignRelative AlignRelative
        {
            get { return alignRelative; }
        }

        public AlignComponentsRelativeToModelForm()
        {
            InitializeComponent();
            comboBoxAlignment.SelectedIndex = 0;
            comboBoxAlignmentType.SelectedIndex = 0;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (comboBoxAlignment.Text == "горизонтали")
                align = ComponentAlign.Horizontal;
            else
                align = ComponentAlign.Vertical;

            if (comboBoxAlignmentType.Text == "модели")
                alignRelative = AlignRelative.ToModelSize;
            else if (comboBoxAlignmentType.Text == "ячейки")
                alignRelative = AlignRelative.ToModelCellSize;
            else
                alignRelative = AlignRelative.ToInnerModelSize;

        }
    }
}
